/**
 * Created by jinxs on 2015.08.28.
 */
/**
 * @summary 正则方法
 * @name uiCore#regexs
 * @type {{require: RegExp, email: RegExp, phone: RegExp, mobile: RegExp, url: RegExp, ip: RegExp, currency: RegExp, number: RegExp, zip: RegExp, qq: RegExp, english: RegExp, chinese: RegExp, username: RegExp, integer: RegExp, double: RegExp}}
 */
(function ($) {
    $.regexs = {
        /**
         * 必填
         */
        require: /.+/,
        email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
        phone: /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/,
        mobile: /^((\(\d{2,3}\))|(\d{3}\-))?(\d{11})$/,
        url: /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/,
        ip: /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/,
        currency: /^\d+(\.\d+)?$/,
        number: /^\d+$/,
        zip: /^[1-9]\d{5}$/,
        qq: /^[1-9]\d{4,8}$/,
        english: /^[A-Za-z]+$/,
        chinese: /^[\u0391-\uFFE5]+$/,
        username: /^[a-zA-Z]\w{3,19}$/i,
        integer: /^[-\+]?\d+$/,
        'double': /^[-\+]?\d+(\.\d+)?$/,
        rx_space:/^[　\s\u200b\ufeff]*$/
    };
})(jQuery);
